home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / coding / 80x86 / code32.lzh / PDOSSTR.RT < prev    next >
Text File  |  1993-01-09  |  790b  |  36 lines

  1. public  _putdosstr
  2.  
  3. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  4. ; Print ASCIIZ string to DOS
  5. ; In:
  6. ;   EDX -> ASCIIZ string in low mem
  7. ; Out:
  8. ;   None
  9. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  10. _putdosstr:
  11.         push eax
  12.         push ecx
  13.         push edi
  14.         mov ecx,0ffffffffh
  15.         xor al,al
  16.         mov edi,edx
  17.         repnz scasb
  18.         dec edi
  19.         mov byte ptr [edi],'$'
  20.         mov ecx,_code32a
  21.         add ecx,edx
  22.         mov eax,ecx
  23.         and ax,0fh
  24.         shr ecx,4
  25.         mov v86r_ds,cx
  26.         mov v86r_dx,ax
  27.         mov v86r_ah,9
  28.         mov al,21h
  29.         int 30h
  30.         mov byte ptr [edi],0
  31.         pop edi
  32.         pop ecx
  33.         pop eax
  34.         ret
  35.  
  36.